﻿using Abp.Runtime.Validation;
using Camc.Quality.Dto;
using System;

namespace Camc.Quality.DataDictionary
{
    public class SysCodeDto : PagedAndSortedInputDto, IShouldNormalize
    {
        public Guid? Id { get; set; }

        /// <summary>
        /// 字典类别
        /// </summary>
        public string CodeId { get; set; }
        /// <summary>
        /// 字典名称描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 父亲字典名称
        /// </summary>
        public Guid PPtr { get; set; }

        /// <summary>
        /// 是否使用 0不使用  1使用
        /// </summary>
        public int IsUsed { get; set; }


        /// <summary>
        ///  备注
        /// </summary>
        public string Remark { get; set; }

        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }
    }
}
